﻿using System;
namespace Sparkle.UI
{
    public interface IRegisterdControl
    {
        /// <summary>
        /// Gets or sets the binding property.
        /// </summary>
        /// <value>The binding property.</value>
        System.Windows.DependencyProperty BindingProperty { get; set; }

        /// <summary>
        /// Gets or sets the type of the control.
        /// </summary>
        /// <value>The type of the control.</value>
        Type ControlType { get; set; }

        /// <summary>
        /// Cteates the control.
        /// </summary>
        /// <param name="metadata">The metadata.</param>
        /// <returns></returns>
        System.Windows.Controls.Control CteateControl(Metadata metadata);

        /// <summary>
        /// Gets or sets the default height.
        /// </summary>
        /// <value>The default height.</value>
        int DefaultHeight { get; set; }

        /// <summary>
        /// Gets or sets the default width.
        /// </summary>
        /// <value>The default width.</value>
        int DefaultWidth { get; set; }

        /// <summary>
        /// Gets or sets the name pre fix.
        /// </summary>
        /// <value>The name pre fix.</value>
        string NamePreFix { get; set; }

        /// <summary>
        /// Sets the binding.
        /// </summary>
        /// <param name="control">The control.</param>
        /// <param name="metadata">The metadata.</param>
        /// <param name="entity">The entity.</param>
        void SetBinding(System.Windows.Controls.Control control, Metadata metadata, object entity);
    }
}
